<template>
	<view class="topic-list u-f animate__animated animate__animated" @tap="opendetail">
		<image :src="item.titlepic" mode="widthFix" lazy-load></image>
		<view>
			<view>#{{item.title}}#</view>
			<view class="desc">{{item.desc}}</view>
			<view>动态 {{item.totalnum}} 今日 {{item.todaynum}}</view>
		</view>
	</view>
</template>

<script>
	export default {
		props:{
			item:Object,
			index:Number
		},
		methods:{
			opendetail(){
				uni.navigateTo({
					url:'../../pages/topic-detail/topic-detail'
				})
			}
		}
	}
</script>

<style scoped>
	.desc {
		display: -webkit-box;
		-webkit-box-orient:vertical;
		text-overflow: ellipsis;
		overflow: hidden;
		-webkit-line-clamp:1
	}
	.topic-new {
		padding: 20upx;
	}
	.topic-new>view:first-child {
		padding-bottom: 5upx;
		font-size: 32upx
	}
	.topic-list {
		padding: 20upx 0;
		border-bottom: 1upx solid #EEEEEE;
	}
	.topic-list image {
		max-width: 150upx;
		height: 150upx !important;
		border-radius: 10upx;
		margin-right: 20upx;
	}
	.topic-list>view>view {
		color: #A4A4A4;
	}
	.topic-list>view>view:first-child {
		color: #333333;
		font-size: 32upx
	}
</style>
